"""
4s店设计
"""
class Store:
    """
    店铺类
    """
    def __init__(self):
        self.factory = Factroy()

    def order(self, type):
        """
        买车
        """
        return self.factory.create_car(type)

class Factroy:
    """
    工厂，创建car
    """
    def create_car(self, type):
        if type == "索纳塔":
            return Suonata()
        elif type == "名图":
            return Mingtu()
        elif type == "WayVV5":
            return WayVV5()

class Car:
    """
    车类
    """
    def move(self):
        print("车在移动...")

    def music(self):
        print("在听音乐...")

    def stop(self):
        print("正在停车...")

class Suonata(Car):
    pass

class Mingtu(Car):
    pass

class WayVV5(Car):
    pass

store = Store()
car = store.order("索纳塔")
car.move()
car.music()
car.stop()